package com.crx.springbootinit.service;

import com.crx.springbootinit.model.dto.comment.CommentDto;
import com.crx.springbootinit.model.dto.comment.CommentPostIdPageDTO;
import com.crx.springbootinit.model.dto.comment.CommentsPageDTO;
import com.crx.springbootinit.model.dto.page.PageVO;
import com.crx.springbootinit.model.entity.Comment;
import com.baomidou.mybatisplus.extension.service.IService;
import com.crx.springbootinit.model.vo.comment.CommentChildrenVO;
import com.crx.springbootinit.model.vo.comment.CommentPageVO;
import com.crx.springbootinit.model.vo.comment.CommentsVO;
import com.crx.springbootinit.model.vo.comment.NoticeCommentVO;

/**
 * <p>
 * 评论表 服务类
 * </p>
 *
 * @author author
 * @since 2024-10-21
 */
public interface ICommentService extends IService<Comment> {
    /**
     * 新增评论
     *
     * @param commentDto 评论请求对象
     * @return 成功消息
     */
    CommentChildrenVO addComment(CommentDto commentDto);

    /**
     * 获取评论列表
     * @param commentPostIdPageDTO
     * @return 评论列表
     */
    PageVO<CommentsVO> getCommentListByPostId(String token,CommentPostIdPageDTO commentPostIdPageDTO);

    PageVO<NoticeCommentVO> getNoticeCommentList(int pageNum,int pageSize);

    PageVO<CommentChildrenVO> getChildrenComments(Long userId,long parentId, long momentId, int pageSize, int offset);

    /**
     * Admin分页
     *
     * @param commentsPageDTO
     * @return
     */
    PageVO<CommentPageVO> queryCommentPage(CommentsPageDTO commentsPageDTO);
}
